from bisect import bisect, bisect_left
from typing import List


class Solution:
    def searchRange(self, nums: List[int], target: int) -> List[int]:
        lIdx = bisect_left(nums, target)
        if lIdx == len(nums) or nums[lIdx] != target:
            return [-1, -1]
        rIdx = bisect(nums, target)
        
        return [lIdx, rIdx - 1]